package com.example.zhunongzonghe.enums;

import lombok.Getter;

@Getter
public enum ScenicEvaluateStatusEnum {
    LIKED(1,"点赞"),
    UN_LIKE(0,"未点赞");
    public int code;
    public String desc;

    ScenicEvaluateStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ScenicEvaluateStatusEnum getByCode(int code) {
        for (ScenicEvaluateStatusEnum scenicEvaluateStatusEnum : ScenicEvaluateStatusEnum.values()) {
            if (scenicEvaluateStatusEnum.code == code) {
                return scenicEvaluateStatusEnum;
            }
        }
        return null;
    }
}
